<?php
class inventory extends BaseBean{
    
    public $_table= "mdpdb";
    public $_primarykey= "mdpdb";
    

    public function generateSql(){
       return "select  mdpdb.hh,mdpdb.hh as hh,max(product.pinpai) as pinpai, max(product.xinghao) as xinghao,sum(mdpdb.bykc) as bykc 
				from result00..mdpdb mdpdb inner join comm00..product product on mdpdb.hh=product.id  {filter}  group by mdpdb.hh order by pinpai Asc ";
    }


    /*protected function generateCountSqlWithFilter($filter = array()) {
        return "select count(*) from (".$this->generateSql($filter).");";
    }*/
}
?>